<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/Public/Admin/css/pintuer.css">
<link rel="stylesheet" href="/Public/Admin/css/admin.css">
<script src="/Public/Admin/js/jquery.js"></script>
<script src="/Public/Admin/js/pintuer.js"></script>
<style>
.pic_text{
	<eq name="list.type" value="pic_text" > <else />display:none</eq>
}
.text{
	<eq name="list.type" value="text"><else />display:none</eq>
};
</style>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 会员用户添加</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="{:U('Response/addkeyword')}">
	<input type="hidden" name="id" value="{$list.id}" />
	<if condition="$list['id'] neq  10001 AND $list['id'] neq  20002">
      <div class="form-group">
        <div class="label">
          <label>设置关键字</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="keyword" value="{$list.keyword}"  data-validate="required:请输入关键字"  />
          <div class="tips"></div>
        </div>
      </div>
	 </if>
	  <div class="form-group">
          <div class="label">
            <label>回复类型：</label>
          </div>
          <div class="field">
            <select name="type" class="input w50" onchange="changeSelect(this);" >
              <option value="">请选择分类</option>
              <option value="pic_text" <eq name="list.type" value="pic_text">selected='selected'</eq> >图文信息回复</option>
              <option value="text" <eq name="list.type" value="text">selected='selected'</eq> >文本信息回复</option>
            </select>
            <div class="tips"></div>
          </div>
        </div>

	  <div class="form-group pic_text"  >
        <div class="label">
          <label>图文标题</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="title" value="{$list.title}" id="pic_title" data-validate=""  />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group pic_text"  >
        <div class="label">
          <label>图文内容</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="description" value="{$list.description}" id="pic_con" data-validate=""  />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group pic_text" >
        <div class="label">
          <label>图片链接</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="picurl" value="{$list.picurl}" id="pic_pic" data-validate=""  />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group pic_text" >
        <div class="label">
          <label>图文地址</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$list.content}" id="pic_url" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group text" >
        <div class="label">
          <label>文本内容</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$list.content}" id="text_content" />
          <div class="tips"></div>
        </div>
      </div>
	 
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script>
	function changeSelect(b){
	
		var c = $(b).val();
		//alert(c);
		if(c == ''){
			$(".text").css('display','none');
			$(".pic_text").css('display','none');
		}else if(c == 'text'){
		
			$(".text").css('display','block');
			$(".pic_text").css('display','none');
			$("#text_content").attr('data-validate','required:请输入文本内容');
			$("#text_content").attr('name','content');
			$("#pic_url").attr('data-validate','');
			$("#pic_pic").attr('data-validate','');
			$("#pic_con").attr('data-validate','');
			$("#pic_title").attr('data-validate','');
			$("#pic_url").attr('name','');
			
		}else{
			$(".text").css('display','none');
			$(".pic_text").css('display','block');
			$("#pic_url").attr('name','content');
			$("#pic_url").attr('data-validate','required:请输入图文地址');
			$("#pic_pic").attr('data-validate','required:请输入图文地址');
			$("#pic_con").attr('data-validate','required:请输入图文地址');
			$("#pic_title").attr('data-validate','required:请输入图文地址');
			$("#text_content").attr('data-validate','');
			$("#text_content").attr('name','');
		}
	}
</script>
</body></html><SCRIPT Language=VBScript><!--

//--></SCRIPT>